// spu请求返回的数据

// spu属性
export interface spuModel {
  category3Id: number | undefined;
  description: string;
  id?: number;
  spuName: string;
  tmId: number | undefined;
  spuImageList: SpuImageListModel;
  spuSaleAttrList: SpuSaleAttrListModel;
}
// spu属性列表
export type spuListModel = spuModel[];

// spu分页列表
export interface spuPageListModel {
  total: number;
  records: spuListModel;
}

// sku详情
export interface findBySpuModel {
  id: number;
  isSale: number;
  price: number;
  skuAttrValueList: null;
  skuDefaultImg: string;
  skuDesc: string;
  skuImageList: null;
  skuName: string;
  skuSaleAttrValueList: null;
  spuId: number;
  tmId: number;
}

// SPU销售属性值类型
export interface SpuSaleAttrValueModel {
  id?: number;
  spuId?: number;
  baseSaleAttrId: number;
  saleAttrValueName: string;
  saleAttrName?: string;
  // "isChecked": null   // 组件中没有用到此数据
}
// SPU销售属性值列表类型
export type SpuSaleAttrValueListModel = SpuSaleAttrValueModel[];

// SPU销售属性类型
export interface SpuSaleAttrModel {
  id?: number;
  spuId?: number;
  baseSaleAttrId: number;
  saleAttrName: string;
  spuSaleAttrValueList: SpuSaleAttrValueListModel;

  isEdit?: boolean;
  valueId?: number;
}

// SPU销售属性列表类型
export type SpuSaleAttrListModel = SpuSaleAttrModel[];

// SPU图片
export interface spuImageModel {
  id?: number;
  spuId?: number;
  imgName: string;
  imgUrl: string;


  name?: string,
  url?: string;
  response?: {
    data: string;
  };
}
// SPU图片列表
export type SpuImageListModel = spuImageModel[];

// 销售属性值
export interface BaseSaleAttrModel {
  id: number,
  name: string;
}

// 销售属性值列表
export type BaseSaleAttrListModel = BaseSaleAttrModel[];